<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="css/payover.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/jquery.cookie.js"></script>

    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
</head>

<body>
    <div id="app">
        <!-- ====================1.顶部==================== -->
        <div id="header">

            <!-- logo -->
            <div class="logo">
                <a href=""></a>
                <h3 class="counter">收银台</h3>
            </div>

            <!-- 流程 -->
            <div class="flow">
                <div class="f1">1</div>
                <div class="line"></div>
                <div class="f2">2</div>
                <div class="line"></div>
                <div class="f3">3</div>
                <div class="f-info">
                    <div>提交订单</div>
                    <div>支付订单</div>
                    <div>完成提交</div>
                </div>
            </div>
        </div>






        <div class="main">您已完成订单支付，请进入<a @click="href">我的订单</a>进行查看详情!</div>


        <!-- 流水表格 -->
        <table class=table11_6>
            <tr>
                <th id="order_id">订单号</th>
                <td>{{orderNo}}</td>
            </tr>
            <tr>
                <th id="pay_id">支付单号</th>
                <td>{{flowNo}}</td>
            </tr>
            <tr>
                <th id="pay_time">支付时间</th>
                <td>{{paytime}}</td>
            </tr>
            <tr>
                <th id="pay_mount">支付金额</th>
                <td>{{finalPrice}}</td>
            </tr>
        </table>

    </div>

    <!--引用vue-->
    <script src="js/vue.js"></script>
    <script src="../../js/untils/axios-0.18.0.js"></script>
    <script src="../../js/untils/index.js"></script>
    <script>
        new Vue({
            el: "#app",
            data() {
                return {
                    orderNo: null,
                    flowNo: null,
                    paytime: null,
                    finalPrice: null,
                    admin:null,
                    phone:null,
                }
            },
            methods: {
                href(){
                    location.href="../customer/center_index.html?userId="+this.admin.userId
                }

            },
            created() {
                this.orderNo = window.localStorage.getItem("orderNo")
                this.flowNo = window.localStorage.getItem("flowNo")
                this.paytime = window.localStorage.getItem("paytime")
                this.finalPrice = window.localStorage.getItem("finalPrice")
                //获取用户数据
                var url = decodeURI(window.location.href);
                // console.log(url)
                let str = url.split("?")[1].split("&")
                let phone = str[0].split("=")[1]
                this.phone = phone
                // console.log("本地缓存:"+JSON.parse(window.localStorage.getItem(phone)))
                this.admin = JSON.parse(localStorage.getItem(phone))
                // console.log(this.admin)
            },
            mounted() {
                window.localStorage.removeItem("orderNo")
                window.localStorage.removeItem("flowNo")
                window.localStorage.removeItem("paytime")
                window.localStorage.removeItem("finalPrice")
            }
        })


    </script>

    <!--</script>-->

    <script src="../../js/untils/vue.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>

    <script src="../../js/untils/vue.js"></script>
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>

</body>

</html>